#ifndef _TMR_CONFIGURATION_H
#define _TMR_CONFIGURATION_H
#ifdef __cplusplus
extern "C" {
#endif 

#include <stdbool.h>
#include "at32f4xx.h"
	void TMR1_Configuration(uint32_t _ClockDivision, uint32_t _Period);//for  infrared serial port
	void TMR1_PWM1_Configuration(u16 _pluse);
	void TMR3_Configuration(uint32_t _DIV, uint32_t _Period);//for  sound 
	void TMR3_PWM1_Configuration(u16 _pluse);
	void TMRx_Init(TMR_Type* TMRx, uint16_t div, uint32_t period);
	void TMR9_INIT_FOR_LED_IP5306(void);
	void IP5306_pulse_generate(bool newState);
	void RGB_LED_CLIBARATION(uint8_t rgb, uint16_t min, uint16_t max);
	void rgb_led_set(uint8_t r, uint8_t g, uint8_t b);
#define IS_VIN_PLUG_IN() IO_Read(PC13) /**USB 充电插入,插入时为1 */
#ifdef __cplusplus
}

#endif 
#endif // _TMR_CONFIGURATION_H